<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="https://unpkg.com/vue@next"></script>
<body>
    <div id="app">
        <span>Message: {{ msg }}</span>
        <xd-button v-bind:msg="msg"></xd-button>
    </div>
</body>
<script>
    let app = Vue.createApp({
        data() {
            return { msg: "组件值"}
        }
    })
    //注册组件
    app.component("xd-button",{
        props:["msg"],
        template:"<div>{{msg}}</div>"
    });
    app.mount("#app");
</script>
</html>